package com.heima.shengchanzhe;

import java.util.concurrent.ArrayBlockingQueue;

public class Food extends Thread {
    private ArrayBlockingQueue<String> bd;
    public  Food(ArrayBlockingQueue<String>bd) {
        this.bd = bd;
    }
    @Override
    public void run() {
       while (true){
           String take = null;
           try {
               take = bd.take();
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
           System.out.println("吃货将"+take+"拿出来");

       }
    }
}
